package com.hsd.znsh.repository;

import com.hsd.znsh.entity.HostManager;
import com.hsd.znsh.entity.ManagerSecondManager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-23 11:54:50
 */
public interface ManagerSecondManagerRepository extends JpaRepository<ManagerSecondManager,Integer> {

    @Query("select secondManagerId from ManagerSecondManager where managerId=?1")
    List<Integer> findSecondManagerIdListByManagerId(Integer managerId);

    ManagerSecondManager findByManagerIdAndSecondManagerId(Integer managerId,Integer secondManagerId);

}
